#! /bin/sh

rofi_cmd() {
	rofi -dmenu \
		-theme ~/.config/i3/themes/catppuccin/rofi/powermenu_2.rasi
}

chosen=$(printf "⏻\n󰜉\n󰗼" | rofi_cmd)

case "$chosen" in

# Для systemd
#	"⏻ poweroff") poweroff ;;
#	"󰜉 reboot") reboot ;;
#	"󰗼 exit") bspc quit ;;

# Для runit
	"⏻") sudo shutdown -h now ;;
	"󰜉") sudo shutdown -r now ;;
	"󰗼") bspc quit ;;
	*) exit 1 ;;

esac
